﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SisVenda.Business;
using SisVenda.Data;
using System.Data;
using System.Collections;
using System.Reflection;
using Froggy.Data;
using SisVenda.Web.messageBox;
using SisVenda.Web.Code;

namespace SisVenda.Web.Restrito.Fn
{
    [System.ComponentModel.DataObject(true)]
    public class ManterFuncionarioFn
    {
        [System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Select)]
        public DataTable ObterFuncionario()
        {

            #region SQL
            string sql = @"SELECT p.IdPessoa AS IdFuncionario, p.Nome as Funcionario
	                            FROM Pessoa p  
                                INNER JOIN Funcionario f
                                    ON f.Pessoa_IdPessoa = p.IdPessoa
                                ORDER BY p.Nome";
            #endregion

            DbCommandUtil db = new DbCommandUtil(sql);
            return db.GetDataTable();
        }
    }
}